package com.ithema.reggie.mapper;

import com.ithema.reggie.entity.SetmealDish;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SetmealDishMapper {

    void batchSave(List<SetmealDish> setmealDishes);

    //根据id删除套餐
    void batchDeleteSetmealDish(Long[] ids);

    //根据套餐的id删除菜品
    @Select("select * from setmeal_dish where setmeal_id = #{setmeal_id}")
    List<SetmealDish> findDishById(Long id);

    //根据id删除菜品数量
    @Delete("delete from setmeal_dish where setmeal_id = #{id}")
    void deleteBySetmealId(Long id);
}
